<!DOCTYPE html>
<html lang="zh">

<head>
    <meta charset="utf-8">
    <link rel="stylesheet" href="style.css">
    <title>丝滑的加载条动画</title>
    <style>
        .app {
            width: 100%;
            height: 100vh;
            background-color: #ffffff;
            position: relative;
            display: flex;
            justify-content: center;
            align-items: center;
        }

        .loading43 {
            width: 140px;
            height: 4px;
            border-radius: 2px;
            background-color: rgba(0, 0, 0, 0.2);
            position: relative;
        }

        .loading43:after {
            content: '';
            height: 4px;
            border-radius: 2px;
            background-color: #2aa738;
            position: absolute;
            animation: eff43 2.4s ease-in-out infinite;
        }

        @keyframes eff43 {
            0% {
                width: 0;
            }

            50% {
                width: 100%;
            }

            100% {
                width: 0;
                right: 0;
            }
        }
    </style>
</head>

<body>
    <div class="app">
        <div class="loading43"></div>
    </div>
</body>

</html>